package com.imooc.sell.VO.wang.OutParamVO;

import com.imooc.sell.utils.wang.DateFormatUtils;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class DetailOutVO {
    /**
     * 商品id
     */
    private String product_id;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 商品数量
     */
    private Integer quantity;

    /**
     * 商品单价
     */
    private BigDecimal price;

    /**
     * 商品图片
     */
    private String icon;

    private String createTime;

    public DetailOutVO(String product_id, String name, Integer quantity, BigDecimal price, String icon, Date date) {
        this.product_id = product_id;
        this.name = name;
        this.quantity = quantity;
        this.price = price;
        this.icon = icon;
        this.createTime = DateFormatUtils.format("yyyy-MM-dd HH:mm:ss", date);
    }
}
